// 定义一个基础的接口
interface person2 extends hero, work{ 
    name:string,
    age:number
}

// 定义另外一个特征的接口
interface hero{
    feature:string
}

// 定义一个行为的接口
interface work{
    code:()=>void
}

let p2:person2={
    name:"张小明",
    age:16,
    feature:"勇敢",
    code:()=>{
        console.log("我们都是写代码的")
    }
}
console.log(p2.name,p2.age,p2.feature);
p2.code();